Skip to content

feat(markdown): make embedded lists, tables, and yamlBlocks opt-in by default - #268

Merged
mindsocket merged 2 commits into
mainfrom
feat/embedded-defaults-opt-in
Nov 30, 2026
Merged

mindsocket merged 2 commits into
mainfrom
feat/embedded-defaults-opt-in

Conversation

@mindsocket

Copy link
Copy Markdown
Owner

Refs #265

Summary

Makes implicit extraction of embedded lists, tables, and fenced yaml blocks opt-in (false by default) in plugins.markdown.embedded:

  • Opt-in defaults: resolveEmbeddedParseSpec in src/plugins/markdown/parse-embedded.ts now defaults lists, tables, and yamlBlocks to false. Ordinary bullet lists, tables, and fenced yaml code blocks stay as prose content unless explicitly enabled under plugins.markdown.embedded.
  • Simplified docs/.sctx/config.json: Removed the now-redundant "*": { "lists": false, "tables": false, "yamlBlocks": false } entry.
  • Docs & Tests: Updated docs/config.md (default false), updated tests/plugins/markdown/parse-embedded-config.test.ts to verify default-off and opt-in yamlBlocks: true, and updated existing list/table/YAML-block tests to opt in explicitly. Added generated hook-test/fixtures/config.json to .gitignore.

space_on_a_page evaluation (measured:)

Retaining space_on_a_page / ost_on_a_page for now rather than retiring it in this PR. Auditing all usages shows two things plugins.markdown.embedded does not yet replace on its own:

  1. Single-file space path (space.path pointing to a .md file): The file acts as a container rather than a root node, mapping H1..H5 automatically to hierarchy.levels[0..4] without per-type embedded config.
  2. Multi-root trees in one file + strict depth-skip checks (H1 → H3 throws).

Verification

  • sctx --config docs/.sctx/config.json validate docs (131 valid nodes, 0 errors/warnings)
  • bun run lint, bun run typecheck, bun run build
  • bun run test (977 pass, 15 skip, 0 fail)
  • lefthook pre-push (check-plugin-version, pushed-tree including 57 hook tests, review-check)

Comment thread src/plugins/markdown/parse-embedded.ts Resolved
@mindsocket
mindsocket force-pushed the feat/embedded-defaults-opt-in branch from f99086d to 12fece7 Compare November 30, 2026 10:24
Comment thread src/plugins/markdown/parse-embedded.ts Resolved
Base automatically changed from feat/docs-space to main November 30, 2026 10:26
@mindsocket
mindsocket force-pushed the feat/embedded-defaults-opt-in branch from 12fece7 to 754fb09 Compare November 30, 2026 10:29
Comment thread src/plugins/markdown/parse-embedded.ts Resolved
@claude

claude Bot commented Nov 30, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@mindsocket
mindsocket merged commit c9e1eaf into main Nov 30, 2026
2 checks passed
@mindsocket
mindsocket deleted the feat/embedded-defaults-opt-in branch November 30, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant